import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router/index'
import { createPinia } from 'pinia'

//  
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/index.css'
// 暗黑主题
import 'element-plus/theme-chalk/dark/css-vars.css'

// 导入全局样式
import '@/styles/index.scss'

// 外来的svg注册
import 'virtual:svg-icons-register'

// 注册全局图标
import { registerIcons } from '@/utils/icons'

// 权限控制，动态路由
import '@/router/permission'

const app = createApp(App)

// 注册全局图标
registerIcons(app)

// 注册路由
app.use(router)

// 注册pinia
const pinia = createPinia()
app.use(pinia)

app.mount('#app')